package edu.zju.gis.dbfg.fileserver.service.impl;

import edu.zju.gis.dbfg.common.base.BaseServiceImpl;
import edu.zju.gis.dbfg.fileserver.mapper.RoleMapper;
import edu.zju.gis.dbfg.fileserver.model.Role;
import edu.zju.gis.dbfg.fileserver.service.RoleService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleServiceImpl extends BaseServiceImpl<RoleMapper, Role, String> implements RoleService {

    @Override
    public Role select(String depart, int usrlevel) {
        return mapper.search(depart, usrlevel);
    }

    @Override
    public List<Role> selectByDepartment(String depart) {
        return mapper.searchByDepartment(depart);
    }

    @Override
    public Role departmentsAndLevel(String userId) {
        return mapper.departmentsAndLevel(userId);
    }
}
